﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Addition a = new Addition();
            Subtraction s = new Subtraction();
            Multiplication m = new Multiplication();
            Division d = new Division();

            Console.WriteLine("请输入要用的计算方法：(+ - * /)");
            string O = Console.ReadLine();

            switch (O)
            {
                case "+":
                    Console.WriteLine("请输入两个数：");
                    a.A = int.Parse(Console.ReadLine());
                    a.B = int.Parse(Console.ReadLine());
                    a.DisplayResult();
                    break;
                case "-":
                    Console.WriteLine("请输入两个数：");
                    s.A = int.Parse(Console.ReadLine());
                    s.B = int.Parse(Console.ReadLine());
                    s.DisplayResult();
                    break;
                case "*":
                    Console.WriteLine("请输入两个数：");
                    m.A = int.Parse(Console.ReadLine());
                    m.B = int.Parse(Console.ReadLine());
                    m.DisplayResult();
                    break;
                case "/":
                    Console.WriteLine("请输入两个数：");
                    d.A = int.Parse(Console.ReadLine());
                    d.B = int.Parse(Console.ReadLine());
                    d.DisplayResult();
                    break;
            }
            Console.WriteLine();

            Console.WriteLine("请输入要求面积的类型：(圆  正方形)");
            string p = Console.ReadLine();
            Print(p);
        }
        public static void Print(string p) 
        {
            Shape a = new Shape();
            Circle c = new Circle();
            Square s = new Square();

            Console.WriteLine("请输入数值：");
            double q = double.Parse(Console.ReadLine());
            switch (p)
            {
                case "圆":
                    c.GetArea(q);
                    break;
                case "正方形":
                    s.GetArea(q);
                    break;
            }
        }
    }
}
